<?php 
if(!isset($_SESSION)) session_start();
?>
<head></head>
<script type="text/javascript">
<!--
function insert_image_next () {
	document.getElementById("insert_image_next_button").style.display="none";
	var image_upload_area = parent.document.getElementById("image_upload_area");
	image_upload_area.className = "image_gallery_unloaded";
	
}
//-->
</script>
</head>
<body>

<button onclick="javascript:insert_image_next()" id=insert_image_next_button style=display:none;>Next...</button>

<?php 

 if (isset($_FILES['ufile']['name'])) {
 	$NAME = $_FILES['ufile']['name'];
 	$path1= $_SERVER["DOCUMENT_ROOT"]."/images/".$NAME;
 	copy($_FILES['ufile']['tmp_name'], $path1);
 	$_SESSION["uploaded_image_file"] =  $NAME;
 	echo <<<STOP
 	<script type="text/javascript">
 	 document.getElementById("insert_image_next_button").style.display="block";
 	</script>
STOP;
 }; //else echo "Problem with file upload";

?>
</body>



